<load target="css/main.css"/>
<!--@if(!$map_i)-->
	{@ $map_i=0;}
<!--@end-->

<!--@if(!$act||$mid=='textyle')-->
	<load target="js/map.js"/>
	<script type="text/javascript" src="http://www.google.com/jsapi?key={$widget_info->earth_key}" charset="UTF-8" ></script>
	<script type="text/javascript">
		jQuery(function($){
			$('#google_map{$map_i}>#map_canvas').initialize({
				id : '#google_map{$map_i}',
				index: '{$map_i}'
			});
			$('#google_map{$map_i}').find('#SearchButton').click(function(){
				$('#google_map{$map_i}>#map_canvas').initialize({
					id : '#google_map{$map_i}',
					index: '{$map_i}'
				});
			});
			$('#google_map{$map_i}').find('#back_to_map').click(function(){
				$('#google_map{$map_i}>#map_canvas').initialize({
					id : '#google_map{$map_i}',
					index: '{$map_i}'
				});
			});
		});
		//load google earth
		google.load("earth", "1");
	</script>
<!--@end-->

<div id="google_map{$map_i}" style="width:100%">
	<table width=100%>
		{@ $td_one_w = $widget_info->clock_width+5}
		<tr>
			<td  style="width:{$td_one_w}px;">
				<div id="SearchArea" <!--@if($widget_info->search_display != "true")-->style="display:none"<!--@end-->>
					{@ $width_searchbox = $widget_info->clock_width-72;}
					<input id="address"  type="textbox" value="{$widget_info->map_location}" style="width:{$width_searchbox}px;">
					<input type="button" value="Search" id="SearchButton">
				</div>
				<div>
					<div id="map_canvas" style="width:{$widget_info->clock_width}px;height:{$widget_info->clock_height}px; background:#DDDDDD; text-shadow: gray 1px 1px 3px">
						<p>Your map will be shown in here.</p>
					</div>
					<div><input type="button" value="Back to map" id="back_to_map" style="display: none;" class="back_to_map"></div>
				</div>
			</td>
			<!--@if($widget_info->route_display == "true")-->
				<td style="padding-top:30px;">
					<div id="map_route" <!--@if($widget_info->route_display != "true")-->style="display:none"<!--@end--> style="width:100%;height:100%;">
						<div>
							<label for="from"><span style="width:100px;"><b>From: </b></span></label> <input id="from"  type="textbox" value="" style="width:120px"><br><br style="line-height:5px;">
							<label for="to"><b>To: </b></label> <input id="to"  type="textbox" value="" style="width:120px"><br><br style="line-height:5px;">
							<input type="button" value="Go" id="search_route" style="width:42px"><input type="button" value="Close" id="close_route" style="display:none">
						</div>
						<div id="route_info" style="width:70%;height:100%;display:none"></div>
					</div>
				</td>
			<!--@end-->
		</tr>
	</table>

	<input type="hidden" id="map_width" value="{$widget_info->clock_width}"/>
	<input type="hidden" id="map_height" value="{$widget_info->clock_height}"/>
	<input type="hidden" id="map_type" value="{$widget_info->map_type}"/>
	<input type="hidden" id="zoom_size" value="{$widget_info->zoom_size}"/>
	<input type="hidden" id="street_view" value="{$widget_info->street_view}"/>
	<input type="hidden" id="icon_display" value="{$widget_info->icon_display}"/>
	<input type="hidden" id="information_window" value="{$widget_info->information_window}"/>
	<input type="hidden" id="circle_overlay" value="{$widget_info->circle_overlay}"/>
	<input type="hidden" id="map_type_control" value="{$widget_info->map_type_control}"/>
	<input type="hidden" id="navigation_control" value="{$widget_info->navigation_control}"/>
	<input type="hidden" id="scale_control" value="{$widget_info->scale_control}"/>
	<input type="hidden" id="overview_control" value="{$widget_info->overview_control}"/>
	<input type="hidden" id="earth_control" value="{$widget_info->earth_control}"/>
	<input type="hidden" id="earth_key" value="{$widget_info->earth_key}"/>
	<input type="hidden" id="route_display" value="{$widget_info->route_display}"/>
	<input type="hidden" id="inforwindow_display" value="{$widget_info->inforwindow_display}"/>
	<input type="hidden" id="inforwindow_content" value="{$widget_info->inforwindow_content}"/>
	<input type="hidden" id="earth_display" value="{$widget_info->earth_display}"/>
	<input type="hidden" id="earth_nav_control" value="{$widget_info->earth_nav_control}"/>
	<input type="hidden" id="ballnoon_display" value="{$widget_info->ballnoon_display}"/>
	<input type="hidden" id="ballnoon_content" value="{$widget_info->ballnoon_content}"/>
	<input type="hidden" id="custom_ballnoon" value="{$widget_info->custom_ballnoon}"/>
	<input type="hidden" id="ballnoon_video" value="{$widget_info->ballnoon_video}"/>
</div>

{@ $map_i++;}
